Chris Pollett >Old Classes >
CS154

( Print View )

Student Corner:
  [Grades Sec3]
  [Grades Sec5]

  [Submit Sec3]
  [Submit Sec5]

  [Email List Sec3]
  [Email List Sec5]

  [
Lecture Notes]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












CS154 Spring 2006Practice Midterm 2

The practice exam will appear one week before the exam.

To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes three times. Second and third time try to see how huch you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) The midterm will be in class Apr 12. (b) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (c) You should bring photo ID. (d) There will be more than one version of the test. Each version will be of comparable difficulty. (e) If your cell-phone or beeper goes off you will be excused from the test at that point and graded on what you have done till your excusal. (f) One problem (less typos) on the actual test will be from the practice test.

[Practice Midterm2 Student Solutions-PDF]

1. Our proof that every regular language is determined by some regular expression involved converting a DFA into a GNFA, and then ripping out states until only two were left with the edge between them labelled with a regular expression equivalent to the DFA. Briefly explain what is done during this "ripping out" process.

2. Consider the language L given by the regular expression (ba)*∪(ab)*. Draw the machine for L that would result from the Myhill-Nerode Theorem.

3. Prove the language {w | the number of a's in w is different then the number of b's in w} is not regular. Give a proof that makes use of the Pumping Lemma.

4. Define the following terms and give an example of each. (a) Leftmost derivation. (b) Parse tree. (c) Ambiguous derivation of a string in a grammar.

5. Give the diagram of a PDA for the language {anbmcn+m | n,m >= 0}.

6. Convert S-->aSb | ε to Chomsky Normal Form. Explain how the CYK algorithm would run on the string ab using the resulting grammar.

7. Give a diagram of a Turing Machine which recognizes the language {anbncn | n>=0}.

8. Prove that every language enumerated by an enumerator can be recognized by a Turing Machine

9. Prove that checking if a string is in a context free language is decidable.

10. Give a language that is Turing-Recognizable but not co-Turing Recognizable.